import request from '/@/utils/request';

export function schoolApi() {
    return {
        page(data: Object) {
            return request({
                url: '/test/school/page',
                method: 'get',
                params: data,
            });
        },
        tree() {
            return request({
                url: '/test/school/tree',
                method: 'get',
            });
        },
        save(data: object) {
            return request({
                url: '/test/school/save',
                method: 'post',
                data,
            });
        },
        update(data: object) {
            return request({
                url: '/test/school/update',
                method: 'post',
                data,
            });
        },
        del(id: string) {
            return request({
                url: '/test/school/delete',
                method: 'post',
                data: { id: id },
            });
        },
    };
}

